package com.ymatou.iapi.coupon.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
import com.ymatou.iapi.coupon.parameter.GetValidBatchesBySellerResp;
/**
*获取买手有效的批次列表Call
*FreeMaker Template自动生成代码
*/
public class getValidBatchesBySellerCall extends YmatouBaseCall{
	private static String opurl ="api/Promotion/GetValidBatchesBySeller";
	
	public getValidBatchesBySellerCall() {
		super(EnvSetup.getSystemUrl("couponiapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	

    public String getStatusCode1()
    {
        return getString("statusCode");
    }
	
	 public GetValidBatchesBySellerResp GetValidBatchesBySellerResp()
	    {
		 GetValidBatchesBySellerResp data = null;
	        try {
	            data =
	                    (GetValidBatchesBySellerResp) FormatUtil.GSONToObject(getString("data"),
	                    		GetValidBatchesBySellerResp.class);

	        } catch (Exception e) {
	            e.printStackTrace();
	        }
	        return data;
	    }
}